package cn.com.surker.sale.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 销售泵送价格表
 * </p>
 *
 * @author admin
 * @since 2024-06-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SaleContractPumpPrice implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 标识
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 公司ID
	 */
	private Long orgId;

	/**
	 * 合同ID
	 */
	@NotNull(message = "请选择合同")
	private Long contractId;

	/**
	 * 设备ID
	 */
	@NotNull(message = "泵送类型")
	private Long pumpTypeId;

	@NotNull(message = "泵送规格")
	private Long pumpNormId;

	/**
	 * 价格
	 */
	@NotNull(message = "请输入价格")
	private Double price;

	private Double taxPrice;
	/**
	 * 生效时间
	 */
	@NotNull(message = "请选择生效时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date takeTime;

	/**
	 * 状态(0:启用1：禁用)
	 */
	private Integer status;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 创建人
	 */
	private String creator;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * 修改人
	 */
	private String updator;

	/**
	 * 修改时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;

	public SaleContractPumpPrice(){}
	public SaleContractPumpPrice(Long orgId, Long contractId, Long pumpTypeId,Long pumpNormId, Double price, Date takeTime, Integer status, String remark, String creator, Date createTime) {
		this.orgId = orgId;
		this.contractId = contractId;
		this.pumpTypeId = pumpTypeId;
		this.pumpNormId = pumpNormId;
		this.price = price;
		this.takeTime = takeTime;
		this.status = status;
		this.remark = remark;
		this.creator = creator;
		this.createTime = createTime;
	}
}
